<template>
  <div class="lunbo-aaa">
    <div class="lunbo-item">
      <van-swipe :autoplay="3000">
        <van-swipe-item
          v-for="image in images"
          :key="image.id"
        >
          <img v-lazy="image.pic" />
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>
<script>
import axios from "axios"
export default {
  data() {
    return {
      images: [],
      authoriZation: localStorage.token,
    }
  },
  methods: {
    async getlunbo(authoriZation) {
      await axios.get("https://api.java.crmeb.net/api/front/menu/user", {
        headers: {
          "authori-zation": authoriZation
        }
      }).then(res => {
        console.log(res.data.data);
        this.images = res.data.data.routine_my_banner
      })
    }
  },
  created() {
    this.getlunbo(this.authoriZation)
  }

}
</script>
<style lang="scss" scoped>
*{
  margin: 0;
  padding: 0;
}
.lunbo-aaa{
  width: 94%;
  height: 100%;
  margin: auto;
  margin-top: 10px;
  img{
    width: 100%;
    height: 100%;
    border-radius:10px ;
  }
}
</style>